//
//  FilterViewController.h
//  WHTestDome
//
//  Created by Assistant on 9/22/25.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class FilterViewController;

@protocol FilterViewControllerDelegate <NSObject>
@required
- (void)filterViewController:(FilterViewController *)controller didConfirmWithSelectedOptions:(NSArray<NSString *> *)selectedOptions;
@optional
- (void)filterViewControllerDidCancel:(FilterViewController *)controller;
@end

@interface FilterViewController : UIViewController <UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

@property (nonatomic, weak) id<FilterViewControllerDelegate> delegate;
@property (nonatomic, copy) NSArray<NSString *> *options;
@property (nonatomic, strong)NSString *titleName;
@property (nonatomic, copy) NSSet<NSNumber *> *preselectedIndexes;

// Calculate preferred content height given a maximum allowed height
- (CGFloat)preferredContentHeightWithMax:(CGFloat)maxHeight;

@end

NS_ASSUME_NONNULL_END


